From 24cb0f67eaeb10f34392c423b5159db049f6481e Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 24 Nov 2009 14:38:37 +0000 Subject: [PATCH] tmem: fix freeable memory accounting error Fix tmem accounting error that causes an "apparent" memory leak, creating false negatives when testing memory availability for launching a new domain. Signed-off-by: Dan Magenheimer --- xen/include/xen/tmem_xen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h index 0e19c90680..90b860a5f9 100644 --- a/xen/include/xen/tmem_xen.h +++ b/xen/include/xen/tmem_xen.h @@ -229,7 +229,7 @@ static inline struct page_info *tmh_alloc_page(void *pool, int no_heap) if ( pi == NULL && !no_heap ) pi = alloc_domheap_pages(0,0,MEMF_tmem); ASSERT((pi == NULL) || IS_VALID_PAGE(pi)); - if ( pi != NULL ) + if ( pi != NULL && !no_heap ) atomic_inc(&freeable_page_count); return pi; } -- 2.30.2